package edu.sctu.practice.class02.xuejiahua.assign03;

/**
 * Created by Administrator on 2015/10/26.
 */
public class Rectangle extends GeometricObject {

    public double length, width, area, perimeter;

    public Rectangle(String color, double length, double width) {
        super(color);
        this.length = length;
        this.width = width;
    }

    public double findArea() {
        this.area = (length + width) * 2;
        return area;
    }

    public double findPerimeter() {
        this.perimeter = length * width;
        return perimeter;
    }
}
